<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/1/8
 * Time: 16:37
 */

namespace App\Http\Traits;


use Illuminate\Http\Request;

trait AuthTrait
{
    use BaseTrait;

    // 菜单ID
    protected $menu_id;
    // 权限名称
    protected $name;
    // 权限路由
    protected $route;
    // 权限类型
    protected $type;
    // 分页大小
    protected $limit;
    // 权限ID
    protected $id;
    public function __construct(Request $request)
    {
        $this->menu_id = $request->input('menu_id', 0);
        $this->name = $request->input('name', '');
        $this->route = $request->input('route', '');
        $this->type = $request->input('type', '');
        $this->limit = $request->input('limit', 0);
        $this->id = $request->input('id', 0);
    }
}